package source.events;

/**
 * Class ViewEvent is the event class responsible for communication to the view.
 * Currently this event only packages a type and a playerID.  The constructor
 * takes a ViewEventType to restrict the possible values of the type attribute.
 * @author Joe
 *
 */

public class ViewEvent extends Event{

	private int targetPlayerID;

	public ViewEvent(int pid, ViewEventType vet)
	{
		targetPlayerID = pid;
		type = vet.toString();
	}
	
	public int getPlayerID()
	{
		return targetPlayerID;
	}
	
	public String getType()
	{
		return type;
	}
	
	public String toString()
	{
		return "Player " + targetPlayerID + ": " + type;
	}
}
